﻿using System.Globalization;
using Microsoft.SharePoint;

namespace SPQueryToSql.ApplicationObjects
{
    ///<summary>
    /// Represents SharePoint ContentType
    ///</summary>
    public class ContentTypeInfo
    {
        /// <summary>
        /// Identifier of content type
        /// </summary>
        public string Id;
        /// <summary>
        /// Name
        /// </summary>
        public string Name;
        /// <summary>
        /// Name for current culture
        /// </summary>
        public string NameResource;

        internal ContentTypeInfo(SPContentType type, CultureInfo cultureInfo)
        {
            Id = type.Id.ToString();
            Name = type.Name;
            NameResource = type.NameResource.GetValueForUICulture(cultureInfo);
        }
    }
}
